<?php
include_once "conn.php";
$n=is_numeric($_GET['n'])?$_GET['n']:exit('No Net!');
$rs = $db->query("SELECT * FROM ".DB_PREFIX."qqs where isqd>0 and (nextqd<'$now' or nextqd IS NULL) and sidzt=0");
while($row=$rs->fetch()){ 
	if($config['crontype']){
		$qid=$row['qid'];
		$uin=$row['qq'];
		$sid=$row['sid'];
		$skey=$row['skey'];
		$do=$row['isqd'];
		
		$con=urlencode(get_con($row['qdcon']));
		$lid=10319;
		$next=date("Y-m-d H:i:s",time()+60*60*8-10);
		@$db->exec("update ".DB_PREFIX."qqs set lastqd='$now',nextqd='$next' where qid='$qid'");
		include_once "qzone.class.php";
		$qzone=new qzone($uin,$sid,$skey);
		if($do==2){
			$qzone->qiandao('pc',$con,$lid);
		}else{
			$qzone->qiandao(0,$con,$lid);
		}
		include "mail2.php";
	}else{
		$urls[]="{$nurl}qd.run.php?cron=".$_GET['cron']."&qid={$row['qid']}{$look}";
	}
}
if(!$config['crontype']){
	if($urls){
		$get=duo_curl($urls);
	}
	if($_GET['get']==1){
		print_r($get);
	}
}
exit('Ok!');


